package com.cloudbroker.bcs.platform.ltb.middle.service.impl;

import com.cloudbroker.bcs.common.dao.base.DAOBase;
import com.cloudbroker.bcs.platform.ltb.common.config.ConfigValues;
import com.cloudbroker.bcs.platform.ltb.middle.dao.AppUserDAO;
import com.cloudbroker.bcs.platform.ltb.middle.entity.AppUser;
import com.cloudbroker.bcs.platform.ltb.middle.service.AppUserService;
import com.cloudbroker.bcs.platform.ltb.middle.service.base.TenantServiceImplBase;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * Created by daibd19671 on 2016/12/16.
 */
@Service
public class AppUserServiceImpl extends TenantServiceImplBase<AppUser,String> implements AppUserService{
    @Resource
    private AppUserDAO appUserDAO;

    @Override
    protected DAOBase<AppUser, String> getDAO() {
        return appUserDAO;
    }


    public AppUser getAppUser(AppUser appUser){
        return appUserDAO.getAppUser(appUser);
    }
    public void addAppUser(AppUser appUser){
        appUser.setMycat_flag(ConfigValues.getMycatFlag());
        appUserDAO.addAppUser(appUser);
    }
    public void updateAppUserAlias(AppUser appUser){
        appUserDAO.updateAppUserAlias(appUser);
    }
    public void updateAppUser(AppUser appUser){
        appUserDAO.updateAppUser(appUser);
    }

}
